package com.example.statemachine.core;

import lombok.Data;

import java.util.Date;
import java.util.Map;

@Data
public class StateMachineContext {
    private String businessId;
    private StateEnum currentState;
    private StateEnum previousState;
    private EventEnum event;
    private String operator;
    private Date operateTime;
    private Map<String, Object> extraParams;
    private String remark;

    public StateMachineContext(String businessId, StateEnum currentState, EventEnum event, String operator) {
        this.businessId = businessId;
        this.currentState = currentState;
        this.event = event;
        this.operator = operator;
        this.operateTime = new Date();
    }
}